#include <iostream>
#include <cstdio>
#include <cstring>
#include <algorithm>

using namespace std;

const int N = 1010;
string s;

// 代码太过复杂
int main()
{
    int n, m = 0, count = 0;
    cin >> n;
    while(n)
    {
        m = n % 10;
        count ++;
        if(count == 1)
        {
            for(int i = m; i >= 1; i --)
            {
                s = to_string(i) + s;
            }
        } else if(count == 2)
        {
            while(m--)
            {
                s = "S" + s;
            }
        } else if(count == 3)
        {
            while(m --)
            {
                s = "B" + s;
            }
        }
        n /= 10;
    }
    cout << s << endl;
    return 0;
}

// 参考柳神代码
#include <iostream>
#include <cstdio>
#include <cstring>
#include <algorithm>

using namespace std;

int main()
{
    int n;
    cin >> n;
    int b[3] = {0}, i = 0;
    while(n)
    {
        b[i ++] = n % 10;
        n /= 10;
    }
    
    for(int k = 0; k < b[2]; k ++)
        cout << "B";
    for(int k = 0; k < b[1]; k ++)
        cout << "S";
    for(int k = 0; k < b[0]; k ++)
        cout << k + 1;
    return 0;
}